package com.xgy.backend.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Data;

/**
 * 
 * @TableName level0_board
 */
@TableName(value ="level0_board")
@Data
public class Level0Board implements Serializable {
    /**
     *  盘面id
     */
    @TableId(type = IdType.AUTO)
    private Integer bid;

    /**
     *  棋谱id
     */
    private Integer kid;

    /**
     *  盘面手数
     */
    private Integer moveNum;

    /**
     *  落子策略
     */
    private String policy;

    /**
     *  黑方胜率
     */
    private Double value;

    /**
     *  领地An
     */
    private String area;

    /**
     *  黑方目差
     */
    private Double scoreReg;

    /**
     *  黑方子差概率分布
     */
    private String scoreLogit;


    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Level0Board other = (Level0Board) that;
        return (this.getBid() == null ? other.getBid() == null : this.getBid().equals(other.getBid()))
            && (this.getKid() == null ? other.getKid() == null : this.getKid().equals(other.getKid()))
            && (this.getMoveNum() == null ? other.getMoveNum() == null : this.getMoveNum().equals(other.getMoveNum()))
            && (this.getPolicy() == null ? other.getPolicy() == null : this.getPolicy().equals(other.getPolicy()))
            && (this.getValue() == null ? other.getValue() == null : this.getValue().equals(other.getValue()))
            && (this.getArea() == null ? other.getArea() == null : this.getArea().equals(other.getArea()))
            && (this.getScoreReg() == null ? other.getScoreReg() == null : this.getScoreReg().equals(other.getScoreReg()))
            && (this.getScoreLogit() == null ? other.getScoreLogit() == null : this.getScoreLogit().equals(other.getScoreLogit()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getBid() == null) ? 0 : getBid().hashCode());
        result = prime * result + ((getKid() == null) ? 0 : getKid().hashCode());
        result = prime * result + ((getMoveNum() == null) ? 0 : getMoveNum().hashCode());
        result = prime * result + ((getPolicy() == null) ? 0 : getPolicy().hashCode());
        result = prime * result + ((getValue() == null) ? 0 : getValue().hashCode());
        result = prime * result + ((getArea() == null) ? 0 : getArea().hashCode());
        result = prime * result + ((getScoreReg() == null) ? 0 : getScoreReg().hashCode());
        result = prime * result + ((getScoreLogit() == null) ? 0 : getScoreLogit().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", bid=").append(bid);
        sb.append(", kid=").append(kid);
        sb.append(", moveNum=").append(moveNum);
        sb.append(", policy=").append(policy);
        sb.append(", value=").append(value);
        sb.append(", area=").append(area);
        sb.append(", scoreReg=").append(scoreReg);
        sb.append(", scoreLogit=").append(scoreLogit);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}